﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace YYS
{
    using System.Text.RegularExpressions;
    public static class ClassEx
    {
        /// <summary>
        /// 判断 T（= null）或 （ToString().Trim() == ""）
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static bool jIsNullOrWhiteSpace<T>(this T value)
        {
            return (value == null || value.ToString().Trim() == "");
        }

        /// <summary>
        /// 判断对象 = null
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static bool jIsNull<T>(this T value)
        {
            return value == null;
        }

        /// <summary>
        /// 将值转换为指定类型
        /// </summary>
        /// <typeparam name="T">要转换到的类型</typeparam>
        /// <param name="value">值</param>
        /// <param name="defaultValue">默认值 default(T)</param>
        /// <returns></returns>
        public static T jTo<T>(this object value, T defaultValue = default(T))
        {
            if (value == null) return defaultValue;

            T result = defaultValue;
            try
            {
                var targetType = typeof(T);
                if (targetType == typeof(int) || targetType == typeof(Int32))
                {
                    var str = value == null ? "" : value.ToString();
                    int i;
                    if (int.TryParse(str, out i)) return (T)Convert.ChangeType(i, targetType);
                }
                else if (targetType == typeof(short) || targetType == typeof(Int16))
                {
                    var str = value == null ? "" : value.ToString();
                    short i;
                    if (short.TryParse(str, out i)) return (T)Convert.ChangeType(i, targetType);
                }
                else if (targetType == typeof(long) || targetType == typeof(Int64))
                {
                    var str = value == null ? "" : value.ToString();
                    long i;
                    if (long.TryParse(str, out i)) return (T)Convert.ChangeType(i, targetType);
                }
                else if (targetType == typeof(decimal))
                {
                    var str = value == null ? "" : value.ToString();
                    decimal i;
                    if (decimal.TryParse(str, out i)) return (T)Convert.ChangeType(i, targetType);
                }
                else if (targetType == typeof(double))
                {
                    var str = value == null ? "" : value.ToString();
                    double i;
                    if (double.TryParse(str, out i)) return (T)Convert.ChangeType(i, targetType);
                }
                else if (targetType == typeof(float))
                {
                    var str = value == null ? "" : value.ToString();
                    float i;
                    if (float.TryParse(str, out i)) return (T)Convert.ChangeType(i, targetType);
                }
                else
                {
                    result = (T)value.jTo(typeof(T));
                }
            }
            catch (Exception ex)
            {
                JLog.TraceError("T jTo<T>(this object value = {0}, T defaultValue = {1})\r\n Exception = {2}", value, defaultValue, ex);
            }
            return result;
        }

        /// <summary>
        /// 将值转换为指定类型对象
        /// </summary>
        /// <param name="value"></param>
        /// <param name="targetType"></param>
        /// <returns></returns>
        public static object jTo(this object value, Type targetType)
        {
            try
            {
                return ChangeType(value, targetType);
            }
            catch
            {
                //值类型或具有公共无参构造函数
                return (targetType.IsValueType || targetType.GetConstructor(new Type[] { }) != null) ? Activator.CreateInstance(targetType) : null;
            }
        }

        /// <summary>
        /// 将System.Data.DataRow转换为指定的实体
        /// 根据（列名和属性名 或 传入的Dictionary&lt;属性,列名>）进行匹配
        /// 当 System.Data.DataRow = null 时，返回 new T() 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="Row"></param>
        /// <param name="ColumnMap"></param>
        /// <returns></returns>
        public static T jTo<T>(this System.Data.DataRow Row, Dictionary<string, string> ColumnMap = null) where T : new()
        {
            T TResult = new T();
            if (Row == null) return TResult;
            Type TType = TResult.GetType();
            TType.GetProperties().jEach((propertyInfo) =>
                {
                    if (propertyInfo.CanWrite)
                    {
                        if (Row.Table.Columns.Contains(propertyInfo.Name))
                        {
                            propertyInfo.SetValue(TResult, Row[propertyInfo.Name].jTo(propertyInfo.PropertyType), null);
                        }
                        else if (ColumnMap != null && ColumnMap.ContainsKey(propertyInfo.Name))
                        {
                            if (Row.Table.Columns.Contains(ColumnMap[propertyInfo.Name]))
                            {
                                propertyInfo.SetValue(TResult, Row[ColumnMap[propertyInfo.Name]].jTo(propertyInfo.PropertyType), null);
                            }
                        }
                    }
                });
            return TResult;
        }

        /// <summary>
        /// 将System.Data.SqlClient.SqlDataReader转换为指定的实体
        /// 根据（列名和属性名 或 传入的Dictionary&lt;属性,列名>）进行匹配
        /// 当 System.Data.SqlClient.SqlDataReader = null 时，返回 new T() 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="value"></param>
        /// <param name="ColumnMap">Key = 属性 Value = 列名</param>
        /// <returns></returns>
        public static T jTo<T>(this System.Data.SqlClient.SqlDataReader value, Dictionary<string, string> ColumnMap = null) where T : new()
        {
            T TResult = new T();
            if (value == null) return TResult;
            Type TType = TResult.GetType();
            System.Data.DataTable SchemaTable = value.GetSchemaTable();
            TType.GetProperties().jEach((propertyInfo) =>
                {
                    if (propertyInfo.CanWrite)
                    {
                        if (SchemaTable.Select("ColumnName='" + propertyInfo.Name + "'").Length > 0)
                        {
                            //FastInvoker.PropertyAccessor.Set(TResult, propertyInfo.Name, value[propertyInfo.Name].jTo(propertyInfo.PropertyType));
                            propertyInfo.SetValue(TResult, value[propertyInfo.Name].jTo(propertyInfo.PropertyType), null);
                        }
                        else if (ColumnMap != null && ColumnMap.ContainsKey(propertyInfo.Name))
                        {
                            if (SchemaTable.Select("ColumnName='" + ColumnMap[propertyInfo.Name] + "'").Length > 0)
                            {
                                propertyInfo.SetValue(TResult, value[ColumnMap[propertyInfo.Name]].jTo(propertyInfo.PropertyType), null);
                            }
                        }
                    }
                });
            return TResult;
        }
        /// <summary>
        /// 将System.Xml.Linq.XElement转换为指定的实体
        /// 根据（列名和标签名 或 传入的Dictionary&lt;属性,列名>）进行匹配
        /// 当 System.Xml.Linq.XElement = null 时，返回 new T() 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="xel"></param>
        /// <param name="TResult"></param>
        /// <param name="ColumnMap"></param>
        /// <returns></returns>
        public static T jTo<T>(this System.Xml.Linq.XElement xel, T TResult = default(T), Dictionary<string, string> ColumnMap = null) where T : new()
        {
            if (TResult == null) TResult = new T();
            if (xel == null || !xel.HasElements) return TResult;
            Type TType = TResult.GetType();
            TType.GetProperties().jEach((propertyInfo) =>
            {
                if (propertyInfo.CanWrite)
                {
                    if (xel.Element(propertyInfo.Name) != null)
                    {
                        propertyInfo.SetValue(TResult, xel.Element(propertyInfo.Name).Value.jTo(propertyInfo.PropertyType), null);
                    }
                    else if (ColumnMap != null && ColumnMap.ContainsKey(propertyInfo.Name))
                    {
                        if (xel.Element(ColumnMap[propertyInfo.Name]) != null)
                        {
                            propertyInfo.SetValue(TResult, xel.Element(ColumnMap[propertyInfo.Name]).Value.jTo(propertyInfo.PropertyType), null);
                        }
                    }
                }
            });
            return TResult;
        }

        /// <summary>
        /// 向System.Data.SqlClient.SqlCommand的Parameters中添加参数
        /// </summary>
        /// <param name="sqlCommand">System.Data.SqlClient.SqlCommand</param>
        /// <param name="parameterName">参数名称</param>
        /// <param name="sqlDbType">数据库类型</param>
        /// <param name="value">值</param>
        /// <param name="Size">长度</param>
        /// <param name="Precision">总位数</param>
        /// <param name="Scale">小数位数</param>
        /// <param name="parameterDirection">参数方向</param>
        /// <returns></returns>
        public static System.Data.SqlClient.SqlParameter AddParameter(this System.Data.SqlClient.SqlCommand sqlCommand, string parameterName, System.Data.SqlDbType sqlDbType, object value, int Size = int.MinValue, byte Precision = byte.MaxValue, byte Scale = byte.MaxValue, System.Data.ParameterDirection parameterDirection = System.Data.ParameterDirection.Input)
        {
            System.Data.SqlClient.SqlParameter sqlParameter = new System.Data.SqlClient.SqlParameter();
            if (sqlCommand != null)
            {
                if (!parameterName.StartsWith("@"))
                {
                    parameterName = "@" + parameterName;
                }
                sqlParameter.ParameterName = parameterName;
                sqlParameter.SqlDbType = sqlDbType;
                sqlParameter.Value = value == null ? DBNull.Value : value;
                if (Size != int.MinValue) sqlParameter.Size = Size;
                if (Precision != byte.MaxValue) sqlParameter.Precision = Precision;
                if (Scale != byte.MaxValue) sqlParameter.Scale = Scale;
                if (parameterDirection != System.Data.ParameterDirection.Input) sqlParameter.Direction = parameterDirection;
                sqlCommand.Parameters.Add(sqlParameter);
            }
            return sqlParameter;
        }


        static object ChangeType(object value, Type TType)
        {
            if (value == null && TType.IsGenericType) return Activator.CreateInstance(TType);
            if (value == null) return null;
            if (TType == value.GetType()) return value;
            if (TType.IsEnum)
            {
                if (value is string)
                    return Enum.Parse(TType, value as string);
                else
                    return Enum.ToObject(TType, value);
            }
            if (!TType.IsInterface && TType.IsGenericType)
            {
                Type innerType = TType.GetGenericArguments()[0];
                object innerValue = ChangeType(value, innerType);
                return Activator.CreateInstance(TType, new object[] { innerValue });
            }
            if (value is string && TType == typeof(Guid)) return new Guid(value as string);
            if (value is string && TType == typeof(Version)) return new Version(value as string);
            if (!(value is IConvertible)) return value;
            return Convert.ChangeType(value, TType);
        }

        /// <summary>
        /// 正则验证
        /// </summary>
        /// <param name="value"></param>
        /// <param name="regex">正则表达式</param>
        /// <returns></returns>
        public static bool JIsMatch(this string value, string regex, RegexOptions options = RegexOptions.None)
        {
            System.Text.RegularExpressions.Regex re = new System.Text.RegularExpressions.Regex(regex, options);
            return re.Match(value == null ? string.Empty : value).Success;
        }

        /// <summary>
        /// 验证用户名只能包含字母数字或下划线
        /// </summary>
        /// <param name="value"></param>
        /// <param name="minLen">最小长度（16 >= minLen >= 2） 默认（2） </param>
        /// <param name="maxLen">最大长度（16 >= maxLen >= 2） 默认（16）</param>
        /// <returns></returns>
        public static bool jIsRegName(this string value, int minLen = 2, int maxLen = 16)
        {
            minLen = minLen < 2 ? 2 : minLen > 16 ? 16 : minLen;
            maxLen = maxLen < minLen ? minLen : maxLen > 16 ? 16 : maxLen;
            return value.JIsMatch(@"^[a-zA-Z0-9_]{" + minLen + "," + maxLen + "}$");
        }

        /// <summary>
        /// 验证密码只能包含字母、数字、_、@、#
        /// </summary>
        /// <param name="value"></param>
        /// <param name="minLen">最小长度（32 >= minLen >= 3） 默认（3） </param>
        /// <param name="maxLen">最大长度（32 >= maxLen >= 3）默认（32）</param>
        /// <returns></returns>
        public static bool jIsRegPwd(this string value, int minLen = 3, int maxLen = 32)
        {
            minLen = minLen < 3 ? 3 : minLen > 32 ? 32 : minLen;
            maxLen = maxLen < minLen ? minLen : maxLen > 32 ? 32 : maxLen;
            return value.JIsMatch(@"^[a-zA-Z0-9_@#]{" + minLen + "," + maxLen + "}$");
        }

        /// <summary>
        /// 是否匹配 yyyy-MM-dd 格式
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool jIsDate(this string input)
        {
            return input.JIsMatch(@"^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29))$");
        }

        /// <summary>
        /// 是否匹配 yyyy-MM-dd HH:mm:ss 格式
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool jIsDateTime(this string input)
        {
            return input.JIsMatch(@"^((([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)) (([0-1]\d)|(2[0-3]):([0-5]\d):([0-5]\d))$");
        }

        /// <summary>
        /// 是否匹配IP地址
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool jIsIP(this string input)
        {
            return input.JIsMatch(@"^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$");
        }

        /// <summary>
        /// 验证是否URL
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static bool jIsURL(this string value)
        {
            System.Text.RegularExpressions.Regex re = new System.Text.RegularExpressions.Regex(@"^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+$", RegexOptions.IgnoreCase);
            return re.Match(value ?? string.Empty).Success;
        }

        /// <summary>
        /// 是否手机号码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool jIsMobile(this string input)
        {
            return input.jMobileType().jRange(0, 1, 2);
        }

        /// <summary>
        /// 是否手机短号
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool jIsMobileShort(this string input)
        {
            return input.JIsMatch(@"^(\d{3,6})$");
        }

        /// <summary>
        /// 是否电话号码
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool jIsPhone(this string input)
        {
            return input.JIsMatch(@"^((\d{11})|(((\d{3,4}\d{7,8})|(\d{3,4}-\d{7,8})|(\d{7,8}))(-\d{1,4})?))$");
        }

        /// <summary>
        /// 是否邮件地址
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static bool jIsEmail(this string input)
        {
            return input.JIsMatch(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*");
        }

        /// <summary>
        /// 半角转全角
        /// 全角空格为12288，半角空格为32
        /// 其他字符半角(33-126)与全角(65281-65374)的对应关系是：均相差65248 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static string jToSBC(this string input)
        {
            char[] c = (input == null ? "" : input).ToCharArray();
            for (int i = 0; i < c.Length; i++)
            {
                if (c[i] == 32)
                {
                    c[i] = (char)12288;
                    continue;
                }
                if (c[i] < 127)
                    c[i] = (char)(c[i] + 65248);
            }
            return new string(c);
        }

        /// <summary>
        /// 全角转半角
        /// 全角空格为12288，半角空格为32
        /// 其他字符半角(33-126)与全角(65281-65374)的对应关系是：均相差65248 
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public static string jToDBC(this string input)
        {
            char[] c = (input == null ? "" : input).ToCharArray();
            for (int i = 0; i < c.Length; i++)
            {
                if (c[i] == 12288)
                {
                    c[i] = (char)32;
                    continue;
                }
                if (c[i] > 65280 && c[i] < 65375)
                    c[i] = (char)(c[i] - 65248);
            }
            return new string(c);
        }

        /// <summary>
        /// 日期转换
        /// 成功返回日期，否则返回null
        /// </summary>
        /// <param name="input">要转换的对象</param>        
        /// <param name="distFormat">目标日期格式</param>
        /// <param name="sourceFormat">原日期格式</param>
        /// <returns></returns>
        public static DateTime? jConvertDateTime(this object input, string distFormat = "", string sourceFormat = "")
        {
            if (input == null) return null;

            string sDate = input.ToString();
            sourceFormat = (sourceFormat ?? "").Trim();
            distFormat = (distFormat ?? "").Trim();
            DateTime dateTime;
            if (sourceFormat.Length > 0)
            {
                if (!DateTime.TryParseExact(sDate, sourceFormat, System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.AssumeLocal, out dateTime)) return null;
            }
            else
            {
                if (!DateTime.TryParse(sDate, out dateTime)) return null;
            }
            if (distFormat.Length > 0)
            {
                dateTime = DateTime.Parse(dateTime.ToString(distFormat));
            }
            return dateTime;
        }

        /// <summary>
        /// 字符串转日期
        /// 成功返回日期，否则返回null
        /// </summary>
        /// <param name="input"></param>
        /// <param name="format"></param>
        /// <returns></returns>
        [Obsolete("方法已过时，请使用jConvertDateTime替代")]
        public static DateTime? jConvertToDatetime(this string input, string format = "yyyy-MM-dd")
        {
            return input.jConvertDateTime(sourceFormat: format);
        }

        /// <summary>
        /// 字符串转日期格式
        /// 支持json格式日期：\/Date(1242357713797+0800)\/ 或 \/Date(1242357713797+0800)\/ 或 /Date(1242357713797+0800)/ 或 /Date(1242357713797)/
        /// 如果转换失败 则返回：0001-01-01 00:00:00
        /// </summary>
        /// <param name="input"></param>
        /// <param name="format"></param>
        /// <returns></returns>
        public static DateTime jToDateTime(this string input, string format = "yyyy-MM-dd")
        {
            DateTime dateTime = new DateTime(1, 1, 1);
            if (input.jIsNullOrWhiteSpace()) return dateTime;
            bool IsJsonDate = false;
            if (input.JIsMatch(@"^\\/Date\((\d+)(\+\d+)?\)\\/$"))
            {
                IsJsonDate = true;
                input = input.Replace("\\/", "/");
            }
            else if (input.JIsMatch(@"^/Date\((\d+)(\+\d+)?\)/$"))
            {
                IsJsonDate = true;
            }
            if (!IsJsonDate)
            {
                if (!DateTime.TryParseExact(input, format, System.Globalization.CultureInfo.CurrentCulture, System.Globalization.DateTimeStyles.AssumeLocal, out dateTime))
                {
                    dateTime = new DateTime(1, 1, 1);
                }
            }
            else
            {//转json格式日期
                try
                {
                    string value = input.Substring(6, input.Length - 8);
                    DateTimeKind kind = DateTimeKind.Utc;
                    int index = value.IndexOf('+', 1);
                    if (index == -1)
                        index = value.IndexOf('-', 1);
                    if (index != -1)
                    {
                        kind = DateTimeKind.Local;
                        value = value.Substring(0, index);
                    }
                    long javaScriptTicks = long.Parse(value, System.Globalization.NumberStyles.Integer, System.Globalization.CultureInfo.InvariantCulture);
                    long InitialJavaScriptDateTicks = (new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).Ticks;
                    DateTime utcDateTime = new DateTime((javaScriptTicks * 10000) + InitialJavaScriptDateTicks, DateTimeKind.Utc);
                    switch (kind)
                    {
                        case DateTimeKind.Unspecified:
                            dateTime = DateTime.SpecifyKind(utcDateTime.ToLocalTime(), DateTimeKind.Unspecified);
                            break;
                        case DateTimeKind.Local:
                            dateTime = utcDateTime.ToLocalTime();
                            break;
                        default:
                            dateTime = utcDateTime;
                            break;
                    }
                }
                catch { }
            }
            return dateTime;
        }

        /// <summary>
        /// 移除HTML标签
        /// </summary>
        /// <param name="Htmlstring"></param>
        /// <returns></returns>
        public static string jRemoveHtmlTag(this string input)
        {
            string Htmlstring = input == null ? "" : input;
            if (Htmlstring.Trim() == "") return Htmlstring;
            //删除脚本
            Htmlstring = Regex.Replace(Htmlstring, @"<script[^>]*?>.*?</script>", "", RegexOptions.IgnoreCase);
            //删除样式
            Htmlstring = Regex.Replace(Htmlstring, @"<style[^>]*?>.*?</style>", "", RegexOptions.IgnoreCase);

            //删除HTML
            Htmlstring = Regex.Replace(Htmlstring, @"<(.[^>]*)>", "", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"([\r\n])[\s]+", "", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"-->", "", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"<!--.*", "", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(quot|#34);", "\"", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(amp|#38);", "&", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(lt|#60);", "<", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(gt|#62);", ">", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(nbsp|#160);", " ", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(iexcl|#161);", "\xa1", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(cent|#162);", "\xa2", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(pound|#163);", "\xa3", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&(copy|#169);", "\xa9", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"&#(\d+);", "", RegexOptions.IgnoreCase);
            Htmlstring = Regex.Replace(Htmlstring, @"<img[^>]*>;", "", RegexOptions.IgnoreCase);
            Htmlstring.Replace("<", "");
            Htmlstring.Replace(">", "");
            Htmlstring.Replace("\r\n", "");
            return Htmlstring;
        }

        /// <summary>
        /// 判断字符串（=null）或（Length == 0）
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static bool jIsNullOrEmpty(this string value)
        {
            return (value == null || value.Length == 0);
        }

        /// <summary>
        /// 如果字符串（=null）则返回（string.Empty）
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string jToEmpty(this string value)
        {
            return value == null ? string.Empty : value;
        }

        /// <summary>
        /// 返回字符串移除前后空白的长度
        /// 如果字符串（=null），则返回（0）
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static int jLen(this string value)
        {
            return value.jToEmpty().Trim().Length;
        }

        /// <summary>
        /// 扩展 String.Trim() 当 value = null 时返回"" 否则返回 value.ToString().Trim()
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string jTrim(this object value)
        {
            return value == null ? "" : value.ToString().Trim();
        }

        /// <summary>
        /// 移除字符串末尾指定字符
        /// </summary>
        /// <param name="value">源字符串</param>
        /// <param name="delstr">要移除的字符串</param>
        /// <param name="isGreedy">是否贪婪匹配，默认（False）</param>
        /// <returns></returns>
        public static string jRemoveAtEnd(this string value, string delstr, bool isGreedy = false)
        {
            string str = value.jToEmpty();
            delstr = (delstr.jToEmpty().jLen() == 0) ? @"\s{" + delstr.jToEmpty() + "}" : delstr;
            return delstr.jIsNullOrEmpty() ? str : isGreedy ? Regex.Replace(str, "(" + delstr + ")*$", "") : Regex.Replace(str, "(" + delstr + ")?$", "");
        }

        /// <summary>
        /// 移除字符串开头指定字符
        /// </summary>
        /// <param name="value">源字符串</param>
        /// <param name="delstr">要移除的字符串</param>
        /// <param name="isGreedy">是否贪婪匹配，默认（False）</param>
        /// <returns></returns>
        public static string jRemoveAtBegin(this string value, string delstr, bool isGreedy = false)
        {
            string str = value.jToEmpty();
            delstr = (delstr.jToEmpty().jLen() == 0) ? @"\s{" + delstr.jToEmpty() + "}" : delstr;
            return delstr.jIsNullOrEmpty() ? str : isGreedy ? Regex.Replace(str, "^(" + delstr + ")*", "") : Regex.Replace(str, "^(" + delstr + ")?", "");
        }

        /// <summary>
        /// 取汉字拼音首字母
        /// </summary>
        /// <param name="strText"></param>
        /// <returns></returns>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YPZLXYJZYZYYPNHMYMDYYL"
+ "BLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJL"
+ "JXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQD"
+ "CYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHW"
+ "WKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJ"
+ "XY";
            if (value == null || value.Length == 0)
                return value;
            System.Text.StringBuilder myStr = new System.Text.StringBuilder();
            foreach (char vChar in value)
            {
                if ((int)vChar >= 19968 && (int)vChar <= 40869)
                {
                    // 对可以查找的汉字计算它的首拼音字母的位置，然后输出
                    myStr.Append(strChineseFirstPY[(int)vChar - 19968]);
                }
                else
                {
                    if ((vChar >= 'a' && vChar <= 'z') || (vChar >= 'A' && vChar <= 'Z'))
                    {
                        myStr.Append(char.ToUpper(vChar));
                    }
                    else
                    {
                        myStr.Append(vChar);
                    }
                }
            }
            return myStr.ToString();
        }

        /// <summary>
        ///  URL编码
        ///  HttpUtility.UrlEncode 会把空格转换为“+”，应该是“%20”
        /// </summary>
        /// <param name="value"></param>
        /// <param name="encoding"></param>
        /// <returns></returns>
        public static string jUrlEncode(this string value, System.Text.Encoding encoding)
        {
            return System.Web.HttpUtility.UrlEncode(value == null ? "" : value, encoding).Replace("+", "%20");
        }

        /// <summary>
        /// URL编码（使用System.Text.Encoding.UTF8编码）
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string jUrlEncode(this string value)
        {
            return value.jUrlEncode(System.Text.Encoding.UTF8);
        }

        /// <summary>
        ///  URL解码
        /// </summary>
        /// <param name="str"></param>
        /// <param name="encoding"></param>
        /// <returns></returns>
        public static string jUrlDecode(this string value, System.Text.Encoding encoding)
        {
            return System.Web.HttpUtility.UrlDecode(value == null ? "" : value, encoding);
        }

        /// <summary>
        /// URL解码（使用System.Text.Encoding.UTF8编码）
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string jUrlDecode(this string value)
        {
            return value.jUrlDecode(System.Text.Encoding.UTF8);
        }

        /// <summary>
        /// JavaScript的函数escape()
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public static string jEscape(this string s)
        {
            StringBuilder sb = new StringBuilder();
            byte[] byteArr = System.Text.Encoding.Unicode.GetBytes(s);

            for (int i = 0; i < byteArr.Length; i += 2)
            {
                sb.Append("%u");
                sb.Append(byteArr[i + 1].ToString("X2"));//把字节转换为十六进制的字符串表现形式

                sb.Append(byteArr[i].ToString("X2"));
            }
            return sb.ToString();
        }

        /// <summary>
        /// JavaScript的Unescape()
        /// </summary>
        /// <param name="s"></param>
        /// <returns></returns>
        public static string jUnescape(this string s)
        {
            string str = s.Remove(0, 2);//删除最前面两个＂%u＂
            string[] strArr = str.Split(new string[] { "%u" }, StringSplitOptions.None);//以子字符串＂%u＂分隔
            byte[] byteArr = new byte[strArr.Length * 2];
            for (int i = 0, j = 0; i < strArr.Length; i++, j += 2)
            {
                byteArr[j + 1] = Convert.ToByte(strArr[i].Substring(0, 2), 16);  //把十六进制形式的字串符串转换为二进制字节
                byteArr[j] = Convert.ToByte(strArr[i].Substring(2, 2), 16);
            }
            str = System.Text.Encoding.Unicode.GetString(byteArr);　//把字节转为unicode编码
            return str;
        }

        /// <summary>
        /// XML转义
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string jXmlEscape(this string value)
        {
            return value == null ? string.Empty : value.jXmlUnEscape().Replace("&", "&amp;").Replace("<", "&lt;").Replace(">", "&gt;").Replace("'", "&apos;").Replace("\"", "&quot;");
        }

        /// <summary>
        /// Xml反转义
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static string jXmlUnEscape(this string value)
        {
            return value == null ? string.Empty : value.Replace("&amp;", "&").Replace("&lt;", "<").Replace("&gt;", ">").Replace("&apos;", "'").Replace("&quot;", "\"");
        }

        /// <summary>
        /// 获取XElement子元素值
        /// </summary>
        /// <param name="xel"></param>
        /// <param name="Tag">元素名称</param>
        /// <returns></returns>
        public static string jXmlValue(this System.Xml.Linq.XElement xel, string Tag)
        {
            return xel == null ? null : xel.Element(Tag) == null ? null : xel.Element(Tag).Value;
        }

        /// <summary>
        /// 获取XElement子元素值并转换为指定的类型
        /// </summary>
        /// <param name="xel"></param>
        /// <param name="Tag">元素名称</param>
        /// <param name="defaultValue">转换失败时的默认值</param>
        /// <returns></returns>
        public static T jXmlValue<T>(this System.Xml.Linq.XElement xel, string Tag, T defaultValue = default(T))
        {
            return xel == null ? defaultValue : xel.Element(Tag) == null ? defaultValue : xel.Element(Tag).Value.jTo<T>(defaultValue);
        }

        /// <summary>
        /// 字符串转 System.Xml.Linq.XElement
        /// </summary>
        /// <param name="xmlValue"></param>
        /// <returns></returns>
        public static System.Xml.Linq.XElement jConvertToXElement(this string xmlValue)
        {
            if (xmlValue.jTrim().Length == 0)
            {
                throw new ArgumentException("参数值不能为空");
            }
            else if (xmlValue.IndexOf("<!DOCTYPE", StringComparison.OrdinalIgnoreCase) >= 0
                || xmlValue.IndexOf("<!ENTITY", StringComparison.OrdinalIgnoreCase) >= 0
                || xmlValue.IndexOf("<!ELEMENT", StringComparison.OrdinalIgnoreCase) >= 0
            )
            {
                throw new ArgumentException("XXE非法字符");
            }
            return System.Xml.Linq.XElement.Parse(xmlValue);
        }

        /// <summary>
        /// 判断是否数字
        /// </summary>
        /// <param name="value"></param>
        /// <param name="minLen">最小长度（>=1），默认（1）</param>
        /// <param name="maxLen">最大长度（>=0），为（0）时不限长度，默认（0）</param>
        /// <returns></returns>
        public static bool jIsNum(this string value, int minLen = 1, int maxLen = 0)
        {
            minLen = minLen < 1 ? 1 : minLen;
            maxLen = maxLen < minLen ? 0 : maxLen;
            string reg = @"^\d";
            reg += "{" + minLen + ",";
            if (maxLen > 0)
            {
                reg += "" + maxLen + "";
            }
            reg += "}$";
            return value.JIsMatch(reg);
        }

        /// <summary>
        /// 判断是否Int
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static bool jIsInt(this object value)
        {
            int i;
            return int.TryParse(value.jTrim(), out i);
        }

        /// <summary>
        /// 字符串转 System.Xml.Linq.XElement
        /// </summary>
        /// <param name="xmlValue"></param>
        /// <returns></returns>
        public static System.Xml.Linq.XElement ConvertToXElement(this string xmlValue)
        {
            if (xmlValue.xTrim().Length == 0)
            {
                throw new ArgumentException("参数值不能为空");
            }
            else if (xmlValue.IndexOf("<!DOCTYPE", StringComparison.OrdinalIgnoreCase) >= 0
                || xmlValue.IndexOf("<!ENTITY", StringComparison.OrdinalIgnoreCase) >= 0
                || xmlValue.IndexOf("<!ELEMENT", StringComparison.OrdinalIgnoreCase) >= 0
            )
            {
                throw new ArgumentException("XXE非法字符");
            }
            return System.Xml.Linq.XElement.Parse(xmlValue);
        }

        /// <summary>
        /// 取手机类型：-1:无效；0：移动；1：联通；2：电信手机；3：疑似小灵通；
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static int jMobileType(this string value)
        {
            int i = -1;
            if (value.jIsNum(7, 12))
            {
                if (value.Length == 11)
                {
                    var font = value.Substring(0, 3);
                    var ChinaMobile = DefaultValue.ChinaMobile + "," + System.Configuration.ConfigurationManager.AppSettings["ChinaMobile"];
                    var ChinaUnicom = DefaultValue.ChinaUnicom + "," + System.Configuration.ConfigurationManager.AppSettings["ChinaUnicom"];
                    var ChinaTelecom = DefaultValue.ChinaTelecom + "," + System.Configuration.ConfigurationManager.AppSettings["ChinaTelecom"];

                    if (ChinaMobile.Split(',').Contains(font))
                    {
                        i = 0;
                    }
                    else if (ChinaUnicom.Split(',').Contains(font))
                    {
                        i = 1;
                    }
                    else if (ChinaTelecom.Split(',').Contains(font))
                    {
                        i = 2;
                    }
                    else if (value.Substring(0, 1) == "0")
                    {
                        i = 3;
                    }
                }
                else if (value.Length == 7 || value.Length == 8)
                {
                    if (value.Substring(0, 1) != "0")
                    {
                        i = 3;
                    }
                }
                else if (value.Length == 12 && value.Substring(0, 1) == "0")
                {
                    i = 3;
                }
            }
            return i;
        }

        /// <summary>
        /// 将字符串拆分为指定类型的List
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="value"></param>
        /// <param name="separator">分隔符 默认（,）</param>
        /// <returns></returns>
        public static List<T> jToList<T>(this string value, char separator = ',')
        {
            List<T> list = new List<T>();
            if (!jIsNullOrWhiteSpace(value))
            {
                string[] arr = value.Split(separator);
                arr.jEach((s) =>
                    {
                        list.Add(s.jTo<T>());
                    });
            }
            return list;
        }

        /// <summary>
        /// 将列表用指定字符串连接
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="values">列表</param>
        /// <param name="separator">分隔符 默认（,）</param>
        /// <returns></returns>
        public static string jConnect<T>(this IEnumerable<T> values, string separator = ",")
        {
            if (values == null || values.Count() == 0) return string.Empty;
            StringBuilder sb = new StringBuilder();
            values.jEach((x) =>
                {
                    sb.Append(x);
                    sb.Append(separator);
                });
            return sb.ToString().jRemoveAtEnd(separator);
        }

        /// <summary>
        /// 将列表的某个属性用指定字符串连接，
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <typeparam name="TProperty"></typeparam>
        /// <param name="values">列表</param>
        /// <param name="expression"></param>
        /// <param name="separator">分隔符 默认（,）</param>
        /// <returns></returns>
        public static string jConnect<T, TProperty>(this IEnumerable<T> values, System.Linq.Expressions.Expression<Func<T, TProperty>> expression, string separator = ",")
        {
            if (values == null || values.Count() == 0) return string.Empty;
            System.Linq.Expressions.MemberExpression memberExpression = expression.Body as System.Linq.Expressions.MemberExpression;
            StringBuilder sb = new StringBuilder();
            values.jEach((x) =>
            {
                sb.Append(System.Linq.Expressions.Expression.Lambda(System.Linq.Expressions.Expression.Property(System.Linq.Expressions.Expression.Constant(x), memberExpression.Member.Name)).Compile().DynamicInvoke());
                sb.Append(separator);
            });
            return sb.ToString().jRemoveAtEnd(separator);
        }

        /// <summary>
        /// 遍历列表
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="values">列表</param>
        /// <param name="EachAcion">对于每一个元素需要进行的操作</param>
        public static void jEach<T>(this IEnumerable<T> values, Action<T> EachAcion)
        {
            if (values == null || EachAcion == null) return;
            foreach (var value in values)
            {
                EachAcion(value);
            }
        }

        /// <summary>
        /// 遍历添加元素
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="obj"></param>
        /// <param name="values"></param>
        /// <param name="EachAcion">null：add；true：continue；false：break</param>
        public static void jAddRange<T>(this System.Collections.ObjectModel.Collection<T> obj, IEnumerable<T> values, Func<T, bool?> EachAcion = null)
        {
            if (obj == null) return;
            if (values == null) return;
            foreach (var x in values)
            {
                if (EachAcion != null)
                {
                    bool? b = EachAcion(x);
                    if (true == b) continue;
                    else if (false == b) break;
                }
                obj.Add(x);
            }
        }

        /// <summary>
        /// 判断值是否在指定范围内
        /// </summary>
        /// <param name="value"></param>
        /// <param name="range"></param>
        /// <returns></returns>
        public static bool jRange<T>(this T value, params T[] range)
        {
            return (range == null || range.Length == 0) ? false : range.Contains(value);
        }

        /// <summary>
        /// 判断指定的字符串是否包含某些值
        /// </summary>
        /// <param name="value"></param>
        /// <param name="range"></param>
        /// <returns></returns>
        public static bool jContains(this string value, params string[] range)
        {
            return (value == null || range == null || range.Length == 0) ? false : range.Count(x => value.Contains(x)) > 0;
        }

        #region 加密、解密
        /// <summary>
        /// MD5加密 32位小写
        /// </summary>
        /// <param name="value"></param>
        /// <param name="encoding">编码</param>
        /// <param name="Num">加密次数</param>
        /// <returns></returns>
        public static string jEncryptMd5(this string value, System.Text.Encoding encoding, int Num = 1)
        {
            if (value.jIsNullOrWhiteSpace()) return string.Empty;
            Num = Num <= 0 ? 1 : Num;
            string str = value;
            using (System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider())
            {
                for (int i = 0; i < Num; i++)
                {
                    byte[] result = encoding.GetBytes(str);
                    byte[] output = md5.ComputeHash(result);
                    str = BitConverter.ToString(output).Replace("-", "").ToLower();
                }
            }
            return str.ToLower();
        }

        /// <summary>
        /// MD5加密 System.Text.Encoding.UTF8编码 32位小写
        /// </summary>
        /// <param name="value"></param>
        /// <param name="Num">加密次数</param>
        /// <returns></returns>
        public static string jEncryptMd5(this string value, int Num = 1)
        {
            return value.jEncryptMd5(System.Text.Encoding.UTF8, Num);
        }

        /// <summary>
        /// HMAC-SHA256 加密
        /// </summary>
        /// <param name="value"></param>
        /// <param name="secret"></param>
        /// <returns></returns>
        public static string jEncryptHMACSHA256(this string value, string secret)
        {
            secret = secret ?? "";
            var encoding = System.Text.Encoding.UTF8;
            byte[] keyByte = encoding.GetBytes(secret);
            byte[] messageBytes = encoding.GetBytes(value);
            using (var hmacsha256 = new System.Security.Cryptography.HMACSHA256(keyByte))
            {
                byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);
                StringBuilder builder = new StringBuilder();
                for (int i = 0; i < hashmessage.Length; i++)
                {
                    builder.Append(hashmessage[i].ToString("x2"));
                }
                return builder.ToString();
            }
        }

        /// <summary>
        /// SHA1加密
        /// </summary>
        /// <param name="value"></param>
        /// <param name="encoding">编码</param>
        /// <param name="Num">加密次数</param>
        /// <returns></returns>
        public static string jEncryptSHA1(this string value, System.Text.Encoding encoding, int Num = 1)
        {
            if (value.jIsNullOrWhiteSpace()) return string.Empty;
            Num = Num <= 0 ? 1 : Num;
            string str = value;
            using (System.Security.Cryptography.SHA1CryptoServiceProvider sha = new System.Security.Cryptography.SHA1CryptoServiceProvider())
            {
                for (int i = 0; i < Num; i++)
                {
                    byte[] bytValue = encoding.GetBytes(str);
                    byte[] bytHash = sha.ComputeHash(bytValue);
                    sha.Clear();
                    str = Convert.ToBase64String(bytHash);
                }
            }
            return str;
        }

        /// <summary>
        /// SHA1加密 System.Text.Encoding.UTF8编码
        /// </summary>
        /// <param name="value"></param>
        /// <param name="Num">加密次数</param>
        /// <returns></returns>
        public static string jEncryptSHA1(this string value, int Num = 1)
        {
            return value.jEncryptSHA1(System.Text.Encoding.UTF8, Num);
        }

        /// <summary>
        /// .Net自带加密
        /// </summary>
        /// <param name="value"></param>
        /// <param name="passwordFormat">默认MD5</param>
        /// <param name="Num">加密次数 默认（1）</param>
        /// <returns></returns>
        public static string jEncryptNet(this string value, System.Web.Configuration.FormsAuthPasswordFormat passwordFormat = System.Web.Configuration.FormsAuthPasswordFormat.MD5, int Num = 1)
        {
            if (value.jIsNullOrWhiteSpace()) return string.Empty;
            Num = Num <= 0 ? 1 : Num;
            string str = value;
            string encryptType = passwordFormat == System.Web.Configuration.FormsAuthPasswordFormat.MD5 ? "MD5" :
                                 passwordFormat == System.Web.Configuration.FormsAuthPasswordFormat.SHA1 ? "SHA1" :
                                 "Clear";
            for (int i = 0; i < Num; i++)
            {
                value = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, encryptType);
            }
            return value;
        }

        /// <summary>
        /// DES加密（出错返回 string.Empty）
        /// </summary>
        /// <param name="value">要加密的字符串</param>
        /// <param name="Key_64">密钥（Length = 8）</param>
        /// <param name="IV_64">初始化向量（Length >= 8）</param>
        /// <returns></returns>
        public static string jEncryptDES(this string value, string Key_64, string IV_64)
        {
            string result = string.Empty;
            if (value == null) return result;
            try
            {
                using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
                {
                    using (System.Security.Cryptography.DESCryptoServiceProvider provider = new System.Security.Cryptography.DESCryptoServiceProvider())
                    {
                        byte[] byKey = System.Text.ASCIIEncoding.ASCII.GetBytes(Key_64);
                        byte[] byIV = System.Text.ASCIIEncoding.ASCII.GetBytes(IV_64);
                        using (System.Security.Cryptography.CryptoStream cs = new System.Security.Cryptography.CryptoStream(ms, provider.CreateEncryptor(byKey, byIV), System.Security.Cryptography.CryptoStreamMode.Write))
                        {
                            byte[] byInput = Encoding.UTF8.GetBytes(value);
                            cs.Write(byInput, 0, byInput.Length);
                            cs.FlushFinalBlock();
                            result = Convert.ToBase64String(ms.ToArray());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                JLog.TraceError("string JEncryptDES(this string value = {0}, string Key_64 = {1}, string IV_64 = {2})\r\n Exception = {3}", value, Key_64, IV_64, ex);
            }
            return result;
        }

        /// <summary>
        /// DES解密（出错返回 string.Empty）
        /// </summary>
        /// <param name="value">要解密的字符串</param>
        /// <param name="Key_64">密钥（Length = 8）</param>
        /// <param name="IV_64">初始化向量（Length >= 8）</param>
        /// <returns></returns>
        public static string jDecryptDES(this string value, string Key_64, string IV_64)
        {
            string result = string.Empty;
            if (value == null) return result;
            try
            {
                using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
                {
                    using (System.Security.Cryptography.DESCryptoServiceProvider provider = new System.Security.Cryptography.DESCryptoServiceProvider())
                    {
                        byte[] byKey = System.Text.ASCIIEncoding.ASCII.GetBytes(Key_64);
                        byte[] byIV = System.Text.ASCIIEncoding.ASCII.GetBytes(IV_64);
                        using (System.Security.Cryptography.CryptoStream cs = new System.Security.Cryptography.CryptoStream(ms, provider.CreateDecryptor(byKey, byIV), System.Security.Cryptography.CryptoStreamMode.Write))
                        {
                            byte[] byInput = Convert.FromBase64String(value);
                            cs.Write(byInput, 0, byInput.Length);
                            cs.FlushFinalBlock();
                            result = Encoding.UTF8.GetString(ms.ToArray());
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                JLog.TraceError("string JDecryptDES(this string value = {0}, string Key_64 = {1}, string IV_64 = {2})\r\n Exception = {3} ", value, Key_64, IV_64, ex);
            }
            return result;
        }

        /// <summary>
        /// AES加密（出错返回 string.Empty）
        /// </summary>
        /// <param name="value">要加密的字符串</param>
        /// <param name="Key">密钥</param>
        /// <param name="Salt">盐值（Length = 8）</param>
        /// <returns></returns>
        public static string jEncryptAES(this string value, string Key, string Salt)
        {
            string result = string.Empty;
            if (value == null) return result;
            try
            {
                byte[] byInput = System.Text.UTF8Encoding.UTF8.GetBytes(value);
                byte[] bySalt = System.Text.UTF8Encoding.UTF8.GetBytes(Salt);
                // AesManaged - 高级加密标准(AES) 对称算法的管理类
                using (System.Security.Cryptography.AesManaged Aes = new System.Security.Cryptography.AesManaged())
                {
                    // Rfc2898DeriveBytes - 通过使用基于 HMACSHA1 的伪随机数生成器，实现基于密码的密钥派生功能 (PBKDF2 - 一种基于密码的密钥派生函数)
                    // 通过 密码 和 salt 派生密钥
                    using (System.Security.Cryptography.Rfc2898DeriveBytes Rfc = new System.Security.Cryptography.Rfc2898DeriveBytes(Key, bySalt))
                    {
                        Aes.BlockSize = Aes.LegalBlockSizes[0].MaxSize;
                        Aes.KeySize = Aes.LegalKeySizes[0].MaxSize;
                        Aes.Key = Rfc.GetBytes(Aes.KeySize / 8);
                        Aes.IV = Rfc.GetBytes(Aes.BlockSize / 8);
                        // 加密后的输出流
                        using (System.IO.MemoryStream Ms = new System.IO.MemoryStream())
                        {
                            // 将加密后的目标流（encryptStream）与加密转换（encryptTransform）相连接
                            using (System.Security.Cryptography.CryptoStream Cs = new System.Security.Cryptography.CryptoStream(Ms, Aes.CreateEncryptor(), System.Security.Cryptography.CryptoStreamMode.Write))
                            {
                                // 将一个字节序列写入当前 CryptoStream （完成加密的过程）
                                Cs.Write(byInput, 0, byInput.Length);
                                Cs.Close();
                                // 将加密后所得到的流转换成字节数组，再用Base64编码将其转换为字符串
                                result = Convert.ToBase64String(Ms.ToArray());
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                JLog.TraceError("string JEncryptAES(this string value = {0}, string Key = {1}, string Salt = {2})\r\n Exception = {3}", value, Key, Salt, ex);
            }
            return result;
        }

        /// <summary>
        /// AES解密（出错返回 string.Empty）
        /// </summary>
        /// <param name="value">要解密的字符串</param>
        /// <param name="Key">密钥</param>
        /// <param name="Salt">盐值（Length = 8）</param>
        /// <returns></returns>
        public static string jDecryptAES(this string value, string Key, string Salt)
        {
            string result = string.Empty;
            if (value == null) return result;
            try
            {
                byte[] byInput = Convert.FromBase64String(value);
                byte[] bySalt = Encoding.UTF8.GetBytes(Salt);
                using (System.Security.Cryptography.AesManaged Aes = new System.Security.Cryptography.AesManaged())
                {
                    using (System.Security.Cryptography.Rfc2898DeriveBytes rfc = new System.Security.Cryptography.Rfc2898DeriveBytes(Key, bySalt))
                    {
                        Aes.BlockSize = Aes.LegalBlockSizes[0].MaxSize;
                        Aes.KeySize = Aes.LegalKeySizes[0].MaxSize;
                        Aes.Key = rfc.GetBytes(Aes.KeySize / 8);
                        Aes.IV = rfc.GetBytes(Aes.BlockSize / 8);
                        // 解密后的输出流
                        using (System.IO.MemoryStream Ms = new System.IO.MemoryStream())
                        {
                            // 将解密后的目标流（decryptStream）与解密转换（decryptTransform）相连接
                            using (System.Security.Cryptography.CryptoStream Cs = new System.Security.Cryptography.CryptoStream(Ms, Aes.CreateDecryptor(), System.Security.Cryptography.CryptoStreamMode.Write))
                            {
                                // 将一个字节序列写入当前 CryptoStream （完成解密的过程）
                                Cs.Write(byInput, 0, byInput.Length);
                                Cs.Close();
                                // 将解密后所得到的流转换为字符串
                                byte[] decryptBytes = Ms.ToArray();
                                result = UTF8Encoding.UTF8.GetString(decryptBytes, 0, decryptBytes.Length);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                JLog.TraceError("string JDecryptAES(this string value = {0}, string Key = {1}, string Salt = {2})\r\n Exception = {3}", value, Key, Salt, ex);
            }
            return result;
        }


        #region AES加密解密
        /// <summary>
        /// 
        /// </summary>
        /// <param name="EncryptString"></param>
        /// <param name="EncryptKey">8到16位</param>
        /// <param name="Num"></param>
        /// <returns></returns>
        public static string jAESEncrypt(this string EncryptString, string EncryptKey, int Num = 1)
        {
            string m_strEncrypt = string.Empty;
            if (string.IsNullOrEmpty(EncryptString) || string.IsNullOrEmpty(EncryptKey)) return m_strEncrypt;
            Num = Num < 1 ? 1 : Num;
            if (Num == 1)
            {
                try
                {
                    byte[] m_btIV = Convert.FromBase64String("Rkb4jvUy/ye7Cd7k89QQgQ==");
                    using (System.Security.Cryptography.Rijndael m_AESProvider = System.Security.Cryptography.Rijndael.Create())
                    {
                        byte[] m_btEncryptString = Encoding.UTF8.GetBytes(EncryptString);
                        using (System.IO.MemoryStream m_stream = new System.IO.MemoryStream())
                        {
                            using (System.Security.Cryptography.CryptoStream m_csstream = new System.Security.Cryptography.CryptoStream(m_stream, m_AESProvider.CreateEncryptor(Encoding.Default.GetBytes(EncryptKey), m_btIV), System.Security.Cryptography.CryptoStreamMode.Write))
                            {
                                m_csstream.Write(m_btEncryptString, 0, m_btEncryptString.Length);
                                m_csstream.FlushFinalBlock();
                                m_strEncrypt = Convert.ToBase64String(m_stream.ToArray());
                            }
                        }
                    }
                }
                catch
                {
                    m_strEncrypt = string.Empty;
                }
            }
            else
            {
                m_strEncrypt = jAESEncrypt(EncryptString, EncryptKey, 1);
                for (int i = 1; i < Num; i++)
                {
                    m_strEncrypt = jAESEncrypt(m_strEncrypt, EncryptKey, 1);

                }
            }
            return m_strEncrypt;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="DecryptString"></param>
        /// <param name="DecryptKey">8到16位</param>
        /// <param name="Num"></param>
        /// <returns></returns>
        public static string jAESDecrypt(this string DecryptString, string DecryptKey, int Num = 1)
        {
            string m_strDecrypt = string.Empty;
            if (string.IsNullOrEmpty(DecryptString) || string.IsNullOrEmpty(DecryptKey)) return m_strDecrypt;
            Num = Num < 1 ? 1 : Num;
            if (Num == 1)
            {
                try
                {
                    byte[] m_btIV = Convert.FromBase64String("Rkb4jvUy/ye7Cd7k89QQgQ==");
                    using (System.Security.Cryptography.Rijndael m_AESProvider = System.Security.Cryptography.Rijndael.Create())
                    {
                        byte[] m_btDecryptString = Convert.FromBase64String(DecryptString);
                        using (System.IO.MemoryStream m_stream = new System.IO.MemoryStream())
                        {
                            using (System.Security.Cryptography.CryptoStream m_csstream = new System.Security.Cryptography.CryptoStream(m_stream, m_AESProvider.CreateDecryptor(Encoding.Default.GetBytes(DecryptKey), m_btIV), System.Security.Cryptography.CryptoStreamMode.Write))
                            {
                                m_csstream.Write(m_btDecryptString, 0, m_btDecryptString.Length);
                                m_csstream.FlushFinalBlock();
                                m_strDecrypt = Encoding.UTF8.GetString(m_stream.ToArray());
                            }
                        }
                    }
                }
                catch
                {
                    m_strDecrypt = string.Empty;
                }
            }
            else
            {
                m_strDecrypt = jAESDecrypt(DecryptString, DecryptKey, 1);
                for (int i = 1; i < Num; i++)
                {
                    m_strDecrypt = jAESDecrypt(m_strDecrypt, DecryptKey, 1);
                }
            }
            return m_strDecrypt;
        }
        #endregion
        #endregion

        /// <summary>
        /// 扩展string.Format
        /// </summary>
        /// <param name="value"></param>
        /// <param name="objs"></param>
        /// <returns></returns>
        public static string jFormat(this string value, params object[] objs)
        {
            return value.jIsNullOrEmpty() ? string.Empty : string.Format(value, objs);
        }

        #region 序列化
        /// <summary>
        /// 将对象序列化为XML
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="obj"></param>
        /// <param name="RootName"></param>
        /// <param name="Namespace"></param>
        /// <returns></returns>
        public static string jConvertObjectToXml<T>(this T obj, string RootName = "Root", string Namespace = "")
        {
            string result = null;
            RootName = RootName.jIsNullOrWhiteSpace() ? "Root" : RootName;
            if (obj != null)
            {
                try
                {
                    if (obj is System.Collections.IDictionary)
                    {
                        var Dic = obj as System.Collections.IDictionary;
                        StringBuilder sb = new StringBuilder();
                        sb.Append("<?xml version=\"1.0\" encoding=\"utf-8\"?>");
                        sb.Append("<" + RootName + ">");
                        foreach (var key in Dic.Keys)
                        {
                            sb.Append("<Dic><Key>{0}</Key><Value>{1}</Value></Dic>".jFormat(key, Dic[key]));
                        }
                        sb.Append("</" + RootName + ">");
                        return sb.ToString();
                    }
                    using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
                    {
                        using (System.IO.StreamWriter sw = new System.IO.StreamWriter(ms, Encoding.UTF8))
                        {
                            System.Xml.Serialization.XmlRootAttribute xRoot = new System.Xml.Serialization.XmlRootAttribute();
                            xRoot.ElementName = RootName;
                            xRoot.Namespace = Namespace;
                            xRoot.IsNullable = true;

                            System.Xml.Serialization.XmlSerializer xs = new System.Xml.Serialization.XmlSerializer(obj.GetType(), xRoot);
                            System.Xml.Serialization.XmlSerializerNamespaces xsn = new System.Xml.Serialization.XmlSerializerNamespaces();
                            //empty namespaces
                            xsn.Add(String.Empty, String.Empty);
                            xs.Serialize(sw, obj, xsn);
                            result = Encoding.UTF8.GetString(ms.ToArray());
                        }
                    }
                }
                catch (Exception ex)
                {
                    JLog.TraceError("string ToXml<T>(T obj = {0}, string RootName = {1}, string Namespace = {2})\r\n Exception = {3}", obj, RootName, Namespace, ex);
                }
            }
            return result;
        }

        /// <summary>
        /// 将对象序列化为Json
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="obj"></param>
        /// <param name="isTab">是否格式化</param>
        /// <returns></returns>
        public static string jConvertObjectToJson<T>(this T obj, bool isTab = true)
        {
            Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
            //这里使用自定义日期格式，如果不使用的话，默认是ISO8601格式     
            timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss";
            return Newtonsoft.Json.JsonConvert.SerializeObject(obj, isTab ? Newtonsoft.Json.Formatting.Indented : Newtonsoft.Json.Formatting.None, timeConverter);

            #region 如使用.Net DataContractJsonSerializer，当类型为DateTime的值未设置时，会出错
            //using (System.IO.MemoryStream ms = new System.IO.MemoryStream())
            //{
            //    System.Runtime.Serialization.Json.DataContractJsonSerializer serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(obj.GetType());
            //    serializer.WriteObject(ms, obj);
            //    ms.Position = 0;
            //    using (System.IO.StreamReader reader = new System.IO.StreamReader(ms))
            //    {
            //        string json = reader.ReadToEnd();
            //        string p = @"\\/Date\((\d+)\+\d+\)\\/";
            //        MatchEvaluator evaluator = new MatchEvaluator(ConvertJsonDateToDateString);
            //        //对时间进行处理，需要引用System.Text.RegularExpressions;命名空间
            //        Regex reg = new Regex(p);
            //        json = reg.Replace(json, evaluator);
            //        return json;
            //    }
            //}
            #endregion
        }

        /// <summary>
        /// 将字符串转换为 Newtonsoft.Json.Linq.JObject
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static Newtonsoft.Json.Linq.JObject jParseJson(this string json)
        {
            Newtonsoft.Json.Linq.JObject result = null;
            try
            {
                result = Newtonsoft.Json.Linq.JObject.Parse(json);
            }
            catch (Exception ex)
            {
                throw new Exception(string.Format("【{0}】 ParseError：{1}", json, ex.Message));
            }
            return result;
        }

        /// <summary>
        /// 将Json字符串转换为对象
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="json"></param>
        /// <returns></returns>
        public static T jConvertJsonToObject<T>(this string json)
        {
            //Newtonsoft.Json.Converters.IsoDateTimeConverter timeConverter = new Newtonsoft.Json.Converters.IsoDateTimeConverter();
            //这里使用自定义日期格式，如果不使用的话，默认是ISO8601格式     
            // timeConverter.DateTimeFormat = "yyyy'-'MM'-'dd' 'HH':'mm':'ss";
            return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(json);

            #region .Net DataContractJsonSerializer
            //string p = @"\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}";
            //MatchEvaluator evaluator = new MatchEvaluator(ConvertDateStringToJsonDate);    //对时间进行处理
            //Regex reg = new Regex(p);
            //json = reg.Replace(json, evaluator);
            //using (System.IO.MemoryStream ms = new System.IO.MemoryStream(Encoding.Unicode.GetBytes(json)))
            //{
            //    System.Runtime.Serialization.Json.DataContractJsonSerializer serializer = new System.Runtime.Serialization.Json.DataContractJsonSerializer(typeof(T));
            //    T data = (T)serializer.ReadObject(ms);
            //    return data;
            //}
            #endregion
        }

        /// <summary>
        /// 将字符串转换为Newtonsoft.Json.Linq.JObject
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static Newtonsoft.Json.Linq.JObject jConvertToJObject(this string json)
        {
            return Newtonsoft.Json.Linq.JObject.Parse(json);
        }

        /// <summary>
        /// 将Json时间转换成时间字符
        /// </summary>
        static string ConvertJsonDateToDateString(Match m)
        {
            string result = string.Empty;
            DateTime dt = new DateTime(1970, 1, 1);
            dt = dt.AddMilliseconds(long.Parse(m.Groups[1].Value));
            dt = dt.ToLocalTime();
            result = dt.ToString("yyyy-MM-dd HH:mm:ss");
            return result;
        }

        /// <summary>
        /// 将时间字符转换成JSON时间
        /// </summary>
        static string ConvertDateStringToJsonDate(Match m)
        {
            string result = string.Empty;
            DateTime dt = DateTime.Parse(m.Groups[0].Value);
            dt = dt.ToUniversalTime();
            TimeSpan ts = dt - DateTime.Parse("1970-01-01");
            result = string.Format("\\/Date({0}+0800)\\/", ts.TotalMilliseconds);
            return result;
        }
        #endregion

        /// <summary>
        /// 将unix时间戳转换为一般时间格式
        /// </summary>
        /// <param name="timeStamp"></param>
        /// <returns></returns>
        public static DateTime jToDateTime(this string timeStamp)
        {
            DateTime dtResult = DateTime.Now;
            try
            {
                System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
                double d = double.Parse(timeStamp);
                dtResult = startTime.AddMilliseconds(d);
                //DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
                //long lTime = long.Parse(timeStamp + "0000000");
                //TimeSpan toNow = new TimeSpan(lTime);
                //dtResult = dtStart.Add(toNow);
            }
            catch { }
            return dtResult;
        }

        /// <summary>
        /// 将一般时间格式转换为unix时间戳
        /// </summary>
        /// <param name="Time"></param>
        /// <returns></returns>
        public static long jToTimeStamp(this System.DateTime Time)
        {
            DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
            long unixTime = (long)Math.Round((Time - startTime).TotalMilliseconds, MidpointRounding.AwayFromZero);
            return unixTime;
        }

        /// <summary>
        /// unix时间戳转换为时间
        /// </summary>
        /// <param name="timeStamp"></param>
        /// <returns></returns>
        public static DateTime? jFromUnix(this string timeStamp)
        {
            DateTime? dtResult = null;
            if (timeStamp.jTrim().Length == 0 || !timeStamp.JIsMatch(@"^\d{1,}$")) return dtResult;
            System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
            long d;
            if (long.TryParse(timeStamp, out d))
            {
                dtResult = startTime.AddSeconds(d);
            }
            return dtResult;
        }

        /// <summary>
        /// 时间转换为unix时间戳
        /// </summary>
        /// <param name="Time"></param>
        /// <returns></returns>
        public static long jToUnix(this System.DateTime Time)
        {
            DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
            long unixTime = (long)Math.Round((Time - startTime).TotalSeconds, MidpointRounding.AwayFromZero);
            return unixTime;
        }

        /// <summary>
        /// 字符串转时分秒
        /// 成功返回时分秒，否则返回null
        /// </summary>
        /// <param name="input"></param>
        /// <param name="format"></param>
        /// <returns></returns>
        public static TimeSpan? jToTimeSpan(this string input, string format = "")
        {
            if (input.jTrim().Length == 0) return null;
            TimeSpan timeSpan;
            if (format.jTrim().Length == 0)
            {
                if (!TimeSpan.TryParse(input, out timeSpan)) return null;
            }
            else
            {
                if (!TimeSpan.TryParseExact(input, format, null, out timeSpan)) return null;
            }
            return timeSpan;
        }

        /// <summary>
        /// 获取Exception的详细信息
        /// </summary>
        /// <param name="ex"></param>
        /// <param name="format"></param>
        /// <param name="args"></param>
        /// <returns></returns>
        public static string JDetail(this Exception ex, string format = null, params object[] args)
        {
            string Result = String.Empty;
            if (ex != null)
            {
                System.Text.StringBuilder sb = new System.Text.StringBuilder();
                sb.Append("★异常发生时间：");
                sb.Append(DateTime.Now);
                sb.Append(System.Environment.NewLine);
                sb.Append("★异常明细：");
                sb.Append(System.Environment.NewLine);
                sb.Append(ex.ToString());
                sb.Append(System.Environment.NewLine);
                sb.Append("★文件跟踪信息：");
                sb.Append(System.Environment.NewLine);
                System.Diagnostics.StackTrace stacktrace = new System.Diagnostics.StackTrace(true);
                for (int i = 0; i < stacktrace.FrameCount; i++)
                {
                    var frame = stacktrace.GetFrame(i);
                    if (!String.IsNullOrEmpty(frame.GetFileName()))
                    {
                        sb.Append(string.Format("   >>在 {0} 的 {1}；位置 {2} 行号：{3} {4}", frame.GetMethod().DeclaringType, frame.GetMethod(), frame.GetFileName(), frame.GetFileLineNumber(), System.Environment.NewLine));
                    }
                }
                Result = sb.ToString();
                if (format != null && format.Length > 0)
                {
                    Result += "★" + format;
                    if (args.Length > 0)
                    {
                        Result = string.Format(Result, args);
                    }
                }
                return sb.ToString();
            }
            return Result;
        }

        #region 获取post数据
        /// <summary>
        /// 获取post数据
        /// </summary>
        /// <param name="Request">System.Web.HttpRequest</param>
        /// <param name="encoding">System.Text.Encoding 编码方式</param>
        /// <returns></returns>
        public static string JGetPostData(this System.Web.HttpRequest Request, System.Text.Encoding encoding)
        {
            string postData = "";
            using (System.IO.Stream stream = Request.InputStream)
            {
                stream.Position = 0;
                using (System.IO.StreamReader streamReader = new System.IO.StreamReader(stream, encoding))
                {
                    postData = streamReader.ReadToEnd();
                }
            }
            return postData.jTrim();
        }
        /// <summary>
        /// 获取post数据 UTF8编码
        /// </summary>
        /// <param name="Request">System.Web.HttpRequest</param>
        /// <returns></returns>
        public static string JGetPostData(this System.Web.HttpRequest Request)
        {
            return Request.JGetPostData(System.Text.Encoding.UTF8);
        }
        /// <summary>
        /// 获取post数据
        /// </summary>
        /// <param name="Request">System.Web.HttpRequestBase</param>
        /// <param name="encoding">System.Text.Encoding 编码方式</param>
        /// <returns></returns>
        public static string JGetPostData(this System.Web.HttpRequestBase Request, System.Text.Encoding encoding)
        {
            string postData = "";
            using (System.IO.Stream stream = Request.InputStream)
            {
                stream.Position = 0;
                using (System.IO.StreamReader streamReader = new System.IO.StreamReader(stream, encoding))
                {
                    postData = streamReader.ReadToEnd();
                }
            }
            return postData.jTrim();
        }
        /// <summary>
        /// 获取post数据 UTF8编码
        /// </summary>
        /// <param name="Request">System.Web.HttpRequestBase</param>
        /// <returns></returns>
        public static string JGetPostData(this System.Web.HttpRequestBase Request)
        {
            return Request.JGetPostData(System.Text.Encoding.UTF8);
        }
        #endregion
    }
}
